#@html()
#define main()

<div>

    <div class="item">
        <h3 class="clr clr1">操作</h3>
        <div class="item_detail">
            <div class="col-lg-4">
                <a class="btn btn-success active" href="/blog/add">添加新文章</a>
                <a class="btn btn-warning active" href="/out">退出登录</a>
                <a class="btn btn-info active" href="/blog/refreshCache">刷新缓存</a>

            </div>
        </div>
    </div>

    <div class="item">
        <h3 class="clr clr5">文章搜索</h3>
        <div class="item_detail">
            <div class="col-lg-4">
                <form action="/blog/manage">
                    <div class="input-group">
                        <input type="text" class="form-control" id="searchStr" name="searchStr" placeholder="">
                        <span class="input-group-btn">
                                <button class="btn btn-default" type="submit">搜索!</button>
                            </span>
                    </div>
                </form>
            </div>
        </div>
    </div>

    <div class="item">
        <h3 class="clr clr4">文章管理列表</h3>
        <div class="item_detail">
            <table class="table table-hover">
                <tr>
                    <th>
                        标题
                    </th>
                    <th>
                        关键字
                    </th>
                    <th>
                        摘要
                    </th>
                    <th>
                        内容
                    </th>
                    <th>
                        发布时间
                    </th>
                    <th>
                        状态
                    </th>
                    <th>
                        操作
                    </th>
                </tr>
                #for(x : blogPage.getList())
                    <tr class="active">
                        <td class="active">#(x.title)</td>
                        <td class="success">
                            #for(x1 : utilSplit(x.keyWord))
                                <span class="label label-default">#(x1)</span>
                            #end
                        </td>
                        <td class="warning">#(abbrStr(x.describe,12))</td>
                        <td class="warning">#(abbrStr(x.content,12))</td>
                        <td class="warning">#date(x.create_time,'yyyy-MM-dd')</td>
                        <td class="warning">#(x.state == 1 ? '发布' : '草稿')</td>
                        <td>
                            <a class="btn btn-danger btn-xs active" href="/blog/delete/#(x.id)">删除</a>
                            <a class="btn btn-info btn-xs active" href="/blog/edit/#(x.id)">修改</a>
                        </td>
                    </tr>
                #end
            </table>
            #@paginate(blogPage.pageNumber, blogPage.totalPage, "/blog/manage/")
        </div>
    </div>

</div>

#end